package com.ruoyi.redtea.dualprevent.domain.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 分析单元评估之风险辨识
 * @TableName train_assess_analyse_unit
 */
@TableName(value ="train_assess_analyse_unit")
@Data
public class TrainAssessAnalyseUnit implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 分析单元id
     */
    private Integer anaunitId;

    /**
     * 辨识方式
     */
    private Integer identifyWay;

    /**
     * 评估方式	
     */
    private Integer assessWay;

    /**
     * 固有风险等级	
     */
    private Integer fixRiskLevel;

    /**
     * 动态风险等级
     */
    private Integer dynamicRiskLevel;

    /**
     * 
     */
    private Date updateTime;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    @TableLogic
    private Integer isdel;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TrainAssessAnalyseUnit other = (TrainAssessAnalyseUnit) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAnaunitId() == null ? other.getAnaunitId() == null : this.getAnaunitId().equals(other.getAnaunitId()))
            && (this.getIdentifyWay() == null ? other.getIdentifyWay() == null : this.getIdentifyWay().equals(other.getIdentifyWay()))
            && (this.getAssessWay() == null ? other.getAssessWay() == null : this.getAssessWay().equals(other.getAssessWay()))
            && (this.getFixRiskLevel() == null ? other.getFixRiskLevel() == null : this.getFixRiskLevel().equals(other.getFixRiskLevel()))
            && (this.getDynamicRiskLevel() == null ? other.getDynamicRiskLevel() == null : this.getDynamicRiskLevel().equals(other.getDynamicRiskLevel()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getIsdel() == null ? other.getIsdel() == null : this.getIsdel().equals(other.getIsdel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAnaunitId() == null) ? 0 : getAnaunitId().hashCode());
        result = prime * result + ((getIdentifyWay() == null) ? 0 : getIdentifyWay().hashCode());
        result = prime * result + ((getAssessWay() == null) ? 0 : getAssessWay().hashCode());
        result = prime * result + ((getFixRiskLevel() == null) ? 0 : getFixRiskLevel().hashCode());
        result = prime * result + ((getDynamicRiskLevel() == null) ? 0 : getDynamicRiskLevel().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getIsdel() == null) ? 0 : getIsdel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", anaunitId=").append(anaunitId);
        sb.append(", identifyWay=").append(identifyWay);
        sb.append(", assessWay=").append(assessWay);
        sb.append(", fixRiskLevel=").append(fixRiskLevel);
        sb.append(", dynamicRiskLevel=").append(dynamicRiskLevel);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", isdel=").append(isdel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}